<groups>
{foreach from=$groups item=gr}
<group id="{$gr->getId()}" title="{$gr->getName()}" />
{/foreach}
</groups>